using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Extensions.DependencyInjection;
using AutoMapper;
using BCCommon;
using BCEntity.Chats;
using BCDto.Chats;

namespace BCService.Chats
{
    public class AutoMapperProfile : Profile
    {
        public AutoMapperProfile()
        {
            // CreateMap<ThreadEntity, ThreadDto>()
            //     .ForMember(dest => dest.LastChat, opts => opts.ResolveUsing(src =>
            //     {
            //         if (src.LastChatTime == null)
            //         {
            //             return null;
            //         }

            //         return new ThreadLastChatDto
            //         {
            //             ChatTime = src.LastChatTime.Value,
            //             Content = src.LastChatContent,
            //             User = GeneralContainer.ServiceProvider.GetService<>
            //         };
            //     }))
            //     .IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
